Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Add niceAgentIceTcp configuration option and API methods for it #26

Merged
merged 4 commits into from
Feb 19, 2021

Conversation

prlanzarin
Copy link
Contributor

@prlanzarin prlanzarin commented Sep 9, 2020

What is the current behavior you want to change?

Currently, ice-tcp is not explicitly set in Kurento's NiceAgent usage; therefore, it defaults to TRUE (libnice's default) and always does TCP candidate gathering.

Property reference: https://libnice.freedesktop.org/libnice/NiceAgent.html#NiceAgent--ice-tcp

What is the new behavior provided by this change?

The rationale behind this is to give the ability to deactivate TCP candidate gathering in setups where they aren`t needed, thus potentially speeding up the gathering process/connectivity checks and trimming down the number of generated candidates/bound sockets.

From the WebRtcEndpoint.conf.ini:

;; Whether to enable TCP candidate gathering via NiceAgent's ice-tcp property.
;; The motivation behind this is to potentially speed up gathering
;; by preventing TCP candidate gathering in scenarios where they aren't needed.
;; Property reference: https://libnice.freedesktop.org/libnice/NiceAgent.html#NiceAgent--ice-tcp
;;
;; <niceAgentIceTcp> MUST be either 0 (FALSE) or 1 (TRUE)
;; Default is 1 (TRUE)
;niceAgentIceTcp=1

A pair of API methods was also added to be able to control this per element:

  • WebRtcEndpoint.setNiceAgentIceTcp(true|false)
  • WebRtcEndpoint.getNiceAgentIceTcp

How has this been tested?

  • Compiled on 16.04
  • Manually tested:
    • WebRtcEndpoint.conf.ini#niceAgentIceTcp: 1|0, by observing about:webrtc and chrome:webrtc-internals dumps to verify the generated server-side candidates
    • WebRtcEndpoint#setNiceAgentIceTcp(true|false), via the JS client, by observing about:webrtc and chrome:webrtc-internals dumps to verify the generated server-side candidates
  • Pending: unit tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature / enhancement (non-breaking change which improves the project)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • My change requires a change to the documentation
  • My change requires a change in other repository

Checklist

  • I have read the Contribution Guidelines
  • I have added an explanation of what the changes do and why they should be included
  • I have written new tests for the changes, as applicable, and have successfully run them locally

This adds the ability to configure libnice`s NiceAgent ice-tcp property through WebRtcEndpoint.conf.ini or via API

The rationale behind this is to give the ability to deactivate TCP candidate gathering in setups where they aren`t needed, thus potentially speeding up the gathering process and connectivity checks

Property reference: https://libnice.freedesktop.org/libnice/NiceAgent.html#NiceAgent--ice-tcp
@jenkinskurento
Copy link

Hi there, thanks for your Pull Request!

A Kurento member needs to verify that this patch is reasonable to test. In case it is, they should write a comment with the phrase test this please. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by Kurento members will still work. Regular contributors can be whitelisted to skip this step.

Avoid leaking that the feature is internally implemented by a class
named NiceAgent, which the users don't care about.
@j1elo j1elo merged commit fe6092b into Kurento:master Feb 19, 2021
@j1elo j1elo self-assigned this Feb 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants